Date.now = function now() {
    return 1700000000000
};
Date.parse = function () {
    return 1700000000000
};
Date.prototype.valueOf = function () {
    return 1700000000000
};
Date.prototype.getTime = function () {
    return 1700000000000
};
Date.prototype.toString = function () {
    return 1700000000000
};
Performance.prototype.now = function now() {
    return Number('1700000000000'.slice(8))
}
Math.random = function random() {
    return 0.5
};
window.crypto.getRandomValues = function getRandomValues(array32, ...args) {
    return array32;
}

new Proxy(target, {
    get: (target, key) => {
        debugger
        let value = Reflect.get(target, key);
        console.log('get', key, value);
        if (target !== globalThis && value instanceof Function) {
            value = value.bind(target);
        }
        return value;
    },
    set: (target, key, value) => {
        debugger
        console.log('set', key, value);
        return Reflect.set(target, key, value);
    },
    apply: (target, ctx, args) => {
        debugger
        let value = Reflect.apply(target, ctx, args);
        console.log('apply', args, value);
        return value;
    },
    construct: (target, args, newTarget) => {
        debugger
        let value = Reflect.construct(target, args, newTarget);
        console.log('construct', args, value);
        return value;
    },
    has: (target, key) => {
        debugger
        let value = Reflect.get(target, key);
        console.log('has', key, value);
        return value;
    },
})


!function () {
    // hook function
    var _oldFunction = Function
    var _newFunction = function Function() {
        console.log('Function code:', arguments[arguments.length - 1])
        return _oldFunction.apply(this, arguments)
    }
    var v = console.log, n = Function, t = "prototype", e = "toString", o = n[e],
        i = Symbol("(".concat("", ")_", (Math.random() + "")[e](36)))

    function r(n, t, e) {
        Object.defineProperty(n, t, {enumerable: !1, configurable: !0, writable: !0, value: e});
    }

    saf = function (n, m) {
        return r(n, i, `function ${m ? m : n.name || ""}() { [native code] }`), n;
    };
    saf(_newFunction)
    Object.defineProperty(Function.prototype, 'constructor', {
        value: _newFunction,
        enumerable: false,
        configurable: true,
        writable: true,
    })
    Function = _newFunction
    Function.prototype = _oldFunction.prototype
}()
eval_ = eval
window.eval = function (str) {
    return eval_(str)
}

let savetemp = '';
Object.defineProperty(window, 'gdxidpyhxde', {
    set: function (val) {
        debugger
        console.log('hook-->', val)
        savetemp = val
        return val
    },
    get: function () {
        return savetemp
    }
})

window.onbeforeunload = function () { // 页面重新加载前下断点
    console.log("页面正在跳转");
    debugger;
}


